// 判断是否为没有属性的对象类型{}

type IsEmptyType<T> = keyof T extends never
  ? "3333" extends T //区分{}/object
    ? unknown extends T //区分{}/unknown
      ? false
      : true
    : false
  : false;

//1、区分{}/object
// const aa:object='333' //不能赋值
const bb: {} = "3333"; //可以赋值，
//从上面2个区别可以区分{}/object

//2、区分{}/unknown
type DD = unknown extends unknown ? true : false;
type DD1 = unknown extends {} ? true : false;
type A = IsEmptyType<string>; // false
type B = IsEmptyType<{ a: 3 }>; // false
type C = IsEmptyType<{}>; // true
type D = IsEmptyType<any>; // false
type E = IsEmptyType<object>; // false
type F = IsEmptyType<Object>; // false
type G = IsEmptyType<unknown>; // false

export {};
